package com.sinosoft.lk.lkssosampleserver.config;

import com.sinosoft.lk.core.config.SsoServerConfig;
import com.sinosoft.lk.core.server.SsoServerHelper;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

/**
 * @author 绫小路
 * @date 2021/3/13 21:04
 * @description
 */
@Configuration
public class SsoConfig {

  @Bean
  public SsoServerHelper ssoServerHelper() {
    SsoServerConfig config = new SsoServerConfig();
    config.setJedisAddress("redis://127.0.0.1:6379");
    config.setJedisConnectionTimeout(10 * 1000);
    config.setServerName("sso-server-001");
    SsoServerHelper helper = new SsoServerHelper();
    helper.setSsoServerConfig(config);
    return helper;
  }

}
